<?= 
$sOutput = showNavigationElement($this->aDisplayedContent['navigation']);?> 

<?php function showNavigationElement($aArray){?>
<ul>
<?php if(is_array($aArray)) {foreach($aArray as $aElement){?>
<li><a href="<?=$aElement['link']?>"><?=$aElement['name']?></a></li>
<?php if(!empty($aElement['subPages'])){?>
<li>
<?php showNavigationElement($aElement['subPages']);?>
</li>
<?php }?>
<?php }?>
</ul>
<?php  }}?>
